package com.example.productserver.result;

import com.example.productserver.menu.StatusCode;

public class ResultBase {
    private static final long serialVersionUID = 1L;

    private Boolean success = true; // 成功与否

    private StatusCode code; // 状态码

    private String message; // 消息

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    /**
     * 获取 Integer 形式的 Code
     *
     * @author DDM 2018年1月18日
     */
    public Integer getCode() {
        return code.toInteger();
    }

    public void setCode(StatusCode code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
